package com.jiantong.user.enums;

/**
 * Created by mz on 27/7/17.
 *
 */
public enum BreedFactoryIsScale {

    SCALE(1,"规模场"),
    RETAIL(0,"散户");


    private final Integer value;

    private final String description;

    BreedFactoryIsScale(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static BreedFactoryIsScale from(int value) {
        for (BreedFactoryIsScale breedFactoryIsScale : BreedFactoryIsScale.values()) {
            if (breedFactoryIsScale.value == value) {
                return breedFactoryIsScale;
            }
        }
        return null;
    }

    public int value() {
        return this.value;
    }


    @Override
    public String toString() {
        return description;
    }

}
